package com.wanlian.candy.controller;

import com.wanlian.service.ConfigServices;
import com.wanlian.util.DateUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import java.io.*;
import com.wanlian.json.JsonResult;

@Controller
@RequestMapping("/test")
public class TestController {

    @Autowired
    public ConfigServices configServices;


    @RequestMapping(value = "/index", method = {RequestMethod.POST}, produces = "application/json")
    @ResponseBody
    public String republish() {
        // json解析
        // List<Integer> ids = JsonStringUtil.readValueByList(data,

        // Integer.class);
        // 需要填写发布人
        boolean bresult = true;
        return new JsonResult().Serailze(bresult);
    }

    @RequestMapping(value = "/index", method = {RequestMethod.GET})
    public String add() {
        return "main/index";
    }


    public static   void main(String[] args) {

        System.out.println(DateUtil.currentTimestamp().getTime());
    }

}
